package business

import (
	"github.com/flipped-aurora/gin-vue-admin/server/api/v1"
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type EmailTemplateRouter struct {
}

// InitEmailTemplateRouter 初始化 短息模板 路由信息
func (s *EmailTemplateRouter) InitEmailTemplateRouter(Router *gin.RouterGroup) {
	emailTemplateRouter := Router.Group("emailTemplate").Use(middleware.OperationRecord())
	emailTemplateRouterWithoutRecord := Router.Group("emailTemplate")
	var emailTemplateApi = v1.ApiGroupApp.BusinessApiGroup.EmailTemplateApi
	{
		emailTemplateRouter.POST("createEmailTemplate", emailTemplateApi.CreateEmailTemplate)             // 新建短息模板
		emailTemplateRouter.DELETE("deleteEmailTemplate", emailTemplateApi.DeleteEmailTemplate)           // 删除短息模板
		emailTemplateRouter.DELETE("deleteEmailTemplateByIds", emailTemplateApi.DeleteEmailTemplateByIds) // 批量删除短息模板
		emailTemplateRouter.PUT("updateEmailTemplate", emailTemplateApi.UpdateEmailTemplate)              // 更新短息模板
	}
	{
		emailTemplateRouterWithoutRecord.GET("findEmailTemplate", emailTemplateApi.FindEmailTemplate)       // 根据ID获取短息模板
		emailTemplateRouterWithoutRecord.GET("getEmailTemplateList", emailTemplateApi.GetEmailTemplateList) // 获取短息模板列表
	}
}
